$(document).ready(function()
{

	$('#module li').Draggable(
	{
		zIndex: 1000,
		ghosting: true,
		revert: true,
		opacity: 0.8
	}
	);
/*	
	var iFrame = "#content-textarea"
	$("#content-textarea").Droppable(
			{
				accept : "dropaccept",
				tolerance: "intersect",
				ondrop: function (drag)
				{
					var oIframe = document.getElementById("content-textareaIFrame");
					var oDoc = oIframe.contentWindow || oIframe.contentDocument;
				    if (oDoc.document) {
				        oDoc = oDoc.document;
				    }
				    //var textNode = document.createTextNode("{moduleId="+drag.firstChild.innerHTML+"}");
				    
					
					var moduleId = $(drag).attr('id');
					var siteId = $("input[type=hidden][name=id]").val();
					
					var module = document.createElement("img");
				    module.src  = $("#"+moduleId+" span.moduleImage").attr('id');
					module.alt = "MODUL";
					module.className = "modul";
					module.id = $(drag).attr('id');
				    function moduleClick() 
				    {
						var configureDiv = document.createElement("div");
						configureDiv.setAttribute("id", "configureIframe");
						configureDiv.setAttribute("style", 	"position:absolute;" +
				    								 	"width:100%;" +
				    								 	"height:100%;" +
				    								 	"background-color:#ccc;" +
				    								 	"top:0;" +
				    								 	"left:0;");
				    	var new_iFrame = document.createElement("iframe");
				    	new_iFrame.setAttribute("src", "/admin/module/configure/?siteId="+siteId+"&moduleId="+moduleId);
				 
						configureDiv.appendChild(new_iFrame);
						var anchor = document.createElement("a");
						anchor.setAttribute("href", "#");
						anchor.setAttribute("onclick", "removeIframe(\"#configureIframe\");return false;");
						anchor.innerHTML = "Fenster Schlie&szlig;en";
						configureDiv.appendChild(anchor);
				    	$("body").append(configureDiv);
				    }
				    $(module).click(moduleClick); 
				    $(oDoc.body).append(module);
				}
			});*/
}); 